#ifndef __RAND_GEN_H__
#define __RAND_GEN_H__

#include "TypeDefine.h"
#include <stdlib.h>

struct simple_rand{

	simple_rand(UINT32 seed):m_seed(seed){}
	simple_rand():m_seed(0){}

	UINT32 operator()()
	{
		unsigned int a = 1664525, c = 1013904223; // Numerical Recipies	
		//unsigned int a = 69069, c = 5; // GCC

		m_seed=(unsigned int)((long long)a*(long long)m_seed+c);

		return m_seed;
	}

private:
	UINT32 m_seed;
};

#endif